Left Termination of the query pattern rev(b,f) w.r.t. the given Prolog program could successfully be proven:



PROLOG
  ↳ PrologToPiTRSProof

rev2({}0, {}0).
rev2(.2(X, XS), .2(Y, YS)) :- rev13(X, XS, Y), rev23(X, XS, YS).
rev13(X, {}0, X).
rev13(X, .2(Y, YS), Z) :- rev13(Y, YS, Z).
rev23(X, {}0, {}0).
rev23(X, .2(Y, YS), ZS) :- rev23(Y, YS, US), rev2(US, VS), rev2(.2(X, VS), ZS).


With regard to the inferred argument filtering the predicates were used in the following modes:
rev2: (b,f)
rev13: (b,b,f)
rev23: (b,b,f)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:


rev_2_in_ga2([]_0, []_0) -> rev_2_out_ga2([]_0, []_0)
rev_2_in_ga2(._22(X, XS), ._22(Y, YS)) -> if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
rev1_3_in_gga3(X, []_0, X) -> rev1_3_out_gga3(X, []_0, X)
rev1_3_in_gga3(X, ._22(Y, YS), Z) -> if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_in_gga3(Y, YS, Z))
if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_out_gga3(Y, YS, Z)) -> rev1_3_out_gga3(X, ._22(Y, YS), Z)
if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_in_gga3(X, XS, YS))
rev2_3_in_gga3(X, []_0, []_0) -> rev2_3_out_gga3(X, []_0, []_0)
rev2_3_in_gga3(X, ._22(Y, YS), ZS) -> if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_in_ga2(._22(X, VS), ZS))
if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_out_ga2(._22(X, VS), ZS)) -> rev2_3_out_gga3(X, ._22(Y, YS), ZS)
if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_out_gga3(X, XS, YS)) -> rev_2_out_ga2(._22(X, XS), ._22(Y, YS))

The argument filtering Pi contains the following mapping:
rev_2_in_ga2(x1, x2)  =  rev_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
rev_2_out_ga2(x1, x2)  =  rev_2_out_ga1(x2)
if_rev_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_1_ga3(x1, x2, x5)
rev1_3_in_gga3(x1, x2, x3)  =  rev1_3_in_gga2(x1, x2)
rev1_3_out_gga3(x1, x2, x3)  =  rev1_3_out_gga1(x3)
if_rev1_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev1_3_in_1_gga1(x5)
if_rev_2_in_2_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_2_ga2(x3, x5)
rev2_3_in_gga3(x1, x2, x3)  =  rev2_3_in_gga2(x1, x2)
rev2_3_out_gga3(x1, x2, x3)  =  rev2_3_out_gga1(x3)
if_rev2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev2_3_in_1_gga2(x1, x5)
if_rev2_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_2_gga2(x1, x6)
if_rev2_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_3_gga1(x6)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

rev_2_in_ga2([]_0, []_0) -> rev_2_out_ga2([]_0, []_0)
rev_2_in_ga2(._22(X, XS), ._22(Y, YS)) -> if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
rev1_3_in_gga3(X, []_0, X) -> rev1_3_out_gga3(X, []_0, X)
rev1_3_in_gga3(X, ._22(Y, YS), Z) -> if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_in_gga3(Y, YS, Z))
if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_out_gga3(Y, YS, Z)) -> rev1_3_out_gga3(X, ._22(Y, YS), Z)
if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_in_gga3(X, XS, YS))
rev2_3_in_gga3(X, []_0, []_0) -> rev2_3_out_gga3(X, []_0, []_0)
rev2_3_in_gga3(X, ._22(Y, YS), ZS) -> if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_in_ga2(._22(X, VS), ZS))
if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_out_ga2(._22(X, VS), ZS)) -> rev2_3_out_gga3(X, ._22(Y, YS), ZS)
if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_out_gga3(X, XS, YS)) -> rev_2_out_ga2(._22(X, XS), ._22(Y, YS))

The argument filtering Pi contains the following mapping:
rev_2_in_ga2(x1, x2)  =  rev_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
rev_2_out_ga2(x1, x2)  =  rev_2_out_ga1(x2)
if_rev_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_1_ga3(x1, x2, x5)
rev1_3_in_gga3(x1, x2, x3)  =  rev1_3_in_gga2(x1, x2)
rev1_3_out_gga3(x1, x2, x3)  =  rev1_3_out_gga1(x3)
if_rev1_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev1_3_in_1_gga1(x5)
if_rev_2_in_2_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_2_ga2(x3, x5)
rev2_3_in_gga3(x1, x2, x3)  =  rev2_3_in_gga2(x1, x2)
rev2_3_out_gga3(x1, x2, x3)  =  rev2_3_out_gga1(x3)
if_rev2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev2_3_in_1_gga2(x1, x5)
if_rev2_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_2_gga2(x1, x6)
if_rev2_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_3_gga1(x6)


Pi DP problem:
The TRS P consists of the following rules:

REV_2_IN_GA2(._22(X, XS), ._22(Y, YS)) -> IF_REV_2_IN_1_GA5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
REV_2_IN_GA2(._22(X, XS), ._22(Y, YS)) -> REV1_3_IN_GGA3(X, XS, Y)
REV1_3_IN_GGA3(X, ._22(Y, YS), Z) -> IF_REV1_3_IN_1_GGA5(X, Y, YS, Z, rev1_3_in_gga3(Y, YS, Z))
REV1_3_IN_GGA3(X, ._22(Y, YS), Z) -> REV1_3_IN_GGA3(Y, YS, Z)
IF_REV_2_IN_1_GA5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> IF_REV_2_IN_2_GA5(X, XS, Y, YS, rev2_3_in_gga3(X, XS, YS))
IF_REV_2_IN_1_GA5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> REV2_3_IN_GGA3(X, XS, YS)
REV2_3_IN_GGA3(X, ._22(Y, YS), ZS) -> IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
REV2_3_IN_GGA3(X, ._22(Y, YS), ZS) -> REV2_3_IN_GGA3(Y, YS, US)
IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> IF_REV2_3_IN_2_GGA6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> REV_2_IN_GA2(US, VS)
IF_REV2_3_IN_2_GGA6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> IF_REV2_3_IN_3_GGA6(X, Y, YS, ZS, VS, rev_2_in_ga2(._22(X, VS), ZS))
IF_REV2_3_IN_2_GGA6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> REV_2_IN_GA2(._22(X, VS), ZS)

The TRS R consists of the following rules:

rev_2_in_ga2([]_0, []_0) -> rev_2_out_ga2([]_0, []_0)
rev_2_in_ga2(._22(X, XS), ._22(Y, YS)) -> if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
rev1_3_in_gga3(X, []_0, X) -> rev1_3_out_gga3(X, []_0, X)
rev1_3_in_gga3(X, ._22(Y, YS), Z) -> if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_in_gga3(Y, YS, Z))
if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_out_gga3(Y, YS, Z)) -> rev1_3_out_gga3(X, ._22(Y, YS), Z)
if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_in_gga3(X, XS, YS))
rev2_3_in_gga3(X, []_0, []_0) -> rev2_3_out_gga3(X, []_0, []_0)
rev2_3_in_gga3(X, ._22(Y, YS), ZS) -> if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_in_ga2(._22(X, VS), ZS))
if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_out_ga2(._22(X, VS), ZS)) -> rev2_3_out_gga3(X, ._22(Y, YS), ZS)
if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_out_gga3(X, XS, YS)) -> rev_2_out_ga2(._22(X, XS), ._22(Y, YS))

The argument filtering Pi contains the following mapping:
rev_2_in_ga2(x1, x2)  =  rev_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
rev_2_out_ga2(x1, x2)  =  rev_2_out_ga1(x2)
if_rev_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_1_ga3(x1, x2, x5)
rev1_3_in_gga3(x1, x2, x3)  =  rev1_3_in_gga2(x1, x2)
rev1_3_out_gga3(x1, x2, x3)  =  rev1_3_out_gga1(x3)
if_rev1_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev1_3_in_1_gga1(x5)
if_rev_2_in_2_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_2_ga2(x3, x5)
rev2_3_in_gga3(x1, x2, x3)  =  rev2_3_in_gga2(x1, x2)
rev2_3_out_gga3(x1, x2, x3)  =  rev2_3_out_gga1(x3)
if_rev2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev2_3_in_1_gga2(x1, x5)
if_rev2_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_2_gga2(x1, x6)
if_rev2_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_3_gga1(x6)
IF_REV_2_IN_2_GA5(x1, x2, x3, x4, x5)  =  IF_REV_2_IN_2_GA2(x3, x5)
IF_REV2_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_REV2_3_IN_1_GGA2(x1, x5)
IF_REV1_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_REV1_3_IN_1_GGA1(x5)
REV_2_IN_GA2(x1, x2)  =  REV_2_IN_GA1(x1)
IF_REV_2_IN_1_GA5(x1, x2, x3, x4, x5)  =  IF_REV_2_IN_1_GA3(x1, x2, x5)
IF_REV2_3_IN_3_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_REV2_3_IN_3_GGA1(x6)
IF_REV2_3_IN_2_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_REV2_3_IN_2_GGA2(x1, x6)
REV2_3_IN_GGA3(x1, x2, x3)  =  REV2_3_IN_GGA2(x1, x2)
REV1_3_IN_GGA3(x1, x2, x3)  =  REV1_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

REV_2_IN_GA2(._22(X, XS), ._22(Y, YS)) -> IF_REV_2_IN_1_GA5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
REV_2_IN_GA2(._22(X, XS), ._22(Y, YS)) -> REV1_3_IN_GGA3(X, XS, Y)
REV1_3_IN_GGA3(X, ._22(Y, YS), Z) -> IF_REV1_3_IN_1_GGA5(X, Y, YS, Z, rev1_3_in_gga3(Y, YS, Z))
REV1_3_IN_GGA3(X, ._22(Y, YS), Z) -> REV1_3_IN_GGA3(Y, YS, Z)
IF_REV_2_IN_1_GA5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> IF_REV_2_IN_2_GA5(X, XS, Y, YS, rev2_3_in_gga3(X, XS, YS))
IF_REV_2_IN_1_GA5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> REV2_3_IN_GGA3(X, XS, YS)
REV2_3_IN_GGA3(X, ._22(Y, YS), ZS) -> IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
REV2_3_IN_GGA3(X, ._22(Y, YS), ZS) -> REV2_3_IN_GGA3(Y, YS, US)
IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> IF_REV2_3_IN_2_GGA6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> REV_2_IN_GA2(US, VS)
IF_REV2_3_IN_2_GGA6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> IF_REV2_3_IN_3_GGA6(X, Y, YS, ZS, VS, rev_2_in_ga2(._22(X, VS), ZS))
IF_REV2_3_IN_2_GGA6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> REV_2_IN_GA2(._22(X, VS), ZS)

The TRS R consists of the following rules:

rev_2_in_ga2([]_0, []_0) -> rev_2_out_ga2([]_0, []_0)
rev_2_in_ga2(._22(X, XS), ._22(Y, YS)) -> if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
rev1_3_in_gga3(X, []_0, X) -> rev1_3_out_gga3(X, []_0, X)
rev1_3_in_gga3(X, ._22(Y, YS), Z) -> if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_in_gga3(Y, YS, Z))
if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_out_gga3(Y, YS, Z)) -> rev1_3_out_gga3(X, ._22(Y, YS), Z)
if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_in_gga3(X, XS, YS))
rev2_3_in_gga3(X, []_0, []_0) -> rev2_3_out_gga3(X, []_0, []_0)
rev2_3_in_gga3(X, ._22(Y, YS), ZS) -> if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_in_ga2(._22(X, VS), ZS))
if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_out_ga2(._22(X, VS), ZS)) -> rev2_3_out_gga3(X, ._22(Y, YS), ZS)
if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_out_gga3(X, XS, YS)) -> rev_2_out_ga2(._22(X, XS), ._22(Y, YS))

The argument filtering Pi contains the following mapping:
rev_2_in_ga2(x1, x2)  =  rev_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
rev_2_out_ga2(x1, x2)  =  rev_2_out_ga1(x2)
if_rev_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_1_ga3(x1, x2, x5)
rev1_3_in_gga3(x1, x2, x3)  =  rev1_3_in_gga2(x1, x2)
rev1_3_out_gga3(x1, x2, x3)  =  rev1_3_out_gga1(x3)
if_rev1_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev1_3_in_1_gga1(x5)
if_rev_2_in_2_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_2_ga2(x3, x5)
rev2_3_in_gga3(x1, x2, x3)  =  rev2_3_in_gga2(x1, x2)
rev2_3_out_gga3(x1, x2, x3)  =  rev2_3_out_gga1(x3)
if_rev2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev2_3_in_1_gga2(x1, x5)
if_rev2_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_2_gga2(x1, x6)
if_rev2_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_3_gga1(x6)
IF_REV_2_IN_2_GA5(x1, x2, x3, x4, x5)  =  IF_REV_2_IN_2_GA2(x3, x5)
IF_REV2_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_REV2_3_IN_1_GGA2(x1, x5)
IF_REV1_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_REV1_3_IN_1_GGA1(x5)
REV_2_IN_GA2(x1, x2)  =  REV_2_IN_GA1(x1)
IF_REV_2_IN_1_GA5(x1, x2, x3, x4, x5)  =  IF_REV_2_IN_1_GA3(x1, x2, x5)
IF_REV2_3_IN_3_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_REV2_3_IN_3_GGA1(x6)
IF_REV2_3_IN_2_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_REV2_3_IN_2_GGA2(x1, x6)
REV2_3_IN_GGA3(x1, x2, x3)  =  REV2_3_IN_GGA2(x1, x2)
REV1_3_IN_GGA3(x1, x2, x3)  =  REV1_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph contains 2 SCCs with 4 less nodes.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

REV1_3_IN_GGA3(X, ._22(Y, YS), Z) -> REV1_3_IN_GGA3(Y, YS, Z)

The TRS R consists of the following rules:

rev_2_in_ga2([]_0, []_0) -> rev_2_out_ga2([]_0, []_0)
rev_2_in_ga2(._22(X, XS), ._22(Y, YS)) -> if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
rev1_3_in_gga3(X, []_0, X) -> rev1_3_out_gga3(X, []_0, X)
rev1_3_in_gga3(X, ._22(Y, YS), Z) -> if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_in_gga3(Y, YS, Z))
if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_out_gga3(Y, YS, Z)) -> rev1_3_out_gga3(X, ._22(Y, YS), Z)
if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_in_gga3(X, XS, YS))
rev2_3_in_gga3(X, []_0, []_0) -> rev2_3_out_gga3(X, []_0, []_0)
rev2_3_in_gga3(X, ._22(Y, YS), ZS) -> if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_in_ga2(._22(X, VS), ZS))
if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_out_ga2(._22(X, VS), ZS)) -> rev2_3_out_gga3(X, ._22(Y, YS), ZS)
if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_out_gga3(X, XS, YS)) -> rev_2_out_ga2(._22(X, XS), ._22(Y, YS))

The argument filtering Pi contains the following mapping:
rev_2_in_ga2(x1, x2)  =  rev_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
rev_2_out_ga2(x1, x2)  =  rev_2_out_ga1(x2)
if_rev_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_1_ga3(x1, x2, x5)
rev1_3_in_gga3(x1, x2, x3)  =  rev1_3_in_gga2(x1, x2)
rev1_3_out_gga3(x1, x2, x3)  =  rev1_3_out_gga1(x3)
if_rev1_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev1_3_in_1_gga1(x5)
if_rev_2_in_2_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_2_ga2(x3, x5)
rev2_3_in_gga3(x1, x2, x3)  =  rev2_3_in_gga2(x1, x2)
rev2_3_out_gga3(x1, x2, x3)  =  rev2_3_out_gga1(x3)
if_rev2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev2_3_in_1_gga2(x1, x5)
if_rev2_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_2_gga2(x1, x6)
if_rev2_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_3_gga1(x6)
REV1_3_IN_GGA3(x1, x2, x3)  =  REV1_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

REV1_3_IN_GGA3(X, ._22(Y, YS), Z) -> REV1_3_IN_GGA3(Y, YS, Z)

R is empty.
The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._22(x1, x2)
REV1_3_IN_GGA3(x1, x2, x3)  =  REV1_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

REV1_3_IN_GGA2(X, ._22(Y, YS)) -> REV1_3_IN_GGA2(Y, YS)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {REV1_3_IN_GGA2}.
By using the subterm criterion together with the size-change analysis we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> REV_2_IN_GA2(US, VS)
REV2_3_IN_GGA3(X, ._22(Y, YS), ZS) -> REV2_3_IN_GGA3(Y, YS, US)
IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> IF_REV2_3_IN_2_GGA6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
IF_REV_2_IN_1_GA5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> REV2_3_IN_GGA3(X, XS, YS)
REV2_3_IN_GGA3(X, ._22(Y, YS), ZS) -> IF_REV2_3_IN_1_GGA5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
REV_2_IN_GA2(._22(X, XS), ._22(Y, YS)) -> IF_REV_2_IN_1_GA5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
IF_REV2_3_IN_2_GGA6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> REV_2_IN_GA2(._22(X, VS), ZS)

The TRS R consists of the following rules:

rev_2_in_ga2([]_0, []_0) -> rev_2_out_ga2([]_0, []_0)
rev_2_in_ga2(._22(X, XS), ._22(Y, YS)) -> if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_in_gga3(X, XS, Y))
rev1_3_in_gga3(X, []_0, X) -> rev1_3_out_gga3(X, []_0, X)
rev1_3_in_gga3(X, ._22(Y, YS), Z) -> if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_in_gga3(Y, YS, Z))
if_rev1_3_in_1_gga5(X, Y, YS, Z, rev1_3_out_gga3(Y, YS, Z)) -> rev1_3_out_gga3(X, ._22(Y, YS), Z)
if_rev_2_in_1_ga5(X, XS, Y, YS, rev1_3_out_gga3(X, XS, Y)) -> if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_in_gga3(X, XS, YS))
rev2_3_in_gga3(X, []_0, []_0) -> rev2_3_out_gga3(X, []_0, []_0)
rev2_3_in_gga3(X, ._22(Y, YS), ZS) -> if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_in_gga3(Y, YS, US))
if_rev2_3_in_1_gga5(X, Y, YS, ZS, rev2_3_out_gga3(Y, YS, US)) -> if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_in_ga2(US, VS))
if_rev2_3_in_2_gga6(X, Y, YS, ZS, US, rev_2_out_ga2(US, VS)) -> if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_in_ga2(._22(X, VS), ZS))
if_rev2_3_in_3_gga6(X, Y, YS, ZS, VS, rev_2_out_ga2(._22(X, VS), ZS)) -> rev2_3_out_gga3(X, ._22(Y, YS), ZS)
if_rev_2_in_2_ga5(X, XS, Y, YS, rev2_3_out_gga3(X, XS, YS)) -> rev_2_out_ga2(._22(X, XS), ._22(Y, YS))

The argument filtering Pi contains the following mapping:
rev_2_in_ga2(x1, x2)  =  rev_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
rev_2_out_ga2(x1, x2)  =  rev_2_out_ga1(x2)
if_rev_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_1_ga3(x1, x2, x5)
rev1_3_in_gga3(x1, x2, x3)  =  rev1_3_in_gga2(x1, x2)
rev1_3_out_gga3(x1, x2, x3)  =  rev1_3_out_gga1(x3)
if_rev1_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev1_3_in_1_gga1(x5)
if_rev_2_in_2_ga5(x1, x2, x3, x4, x5)  =  if_rev_2_in_2_ga2(x3, x5)
rev2_3_in_gga3(x1, x2, x3)  =  rev2_3_in_gga2(x1, x2)
rev2_3_out_gga3(x1, x2, x3)  =  rev2_3_out_gga1(x3)
if_rev2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_rev2_3_in_1_gga2(x1, x5)
if_rev2_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_2_gga2(x1, x6)
if_rev2_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_rev2_3_in_3_gga1(x6)
IF_REV2_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_REV2_3_IN_1_GGA2(x1, x5)
REV_2_IN_GA2(x1, x2)  =  REV_2_IN_GA1(x1)
IF_REV_2_IN_1_GA5(x1, x2, x3, x4, x5)  =  IF_REV_2_IN_1_GA3(x1, x2, x5)
IF_REV2_3_IN_2_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_REV2_3_IN_2_GGA2(x1, x6)
REV2_3_IN_GGA3(x1, x2, x3)  =  REV2_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
QDP
                    ↳ QDPPoloProof

Q DP problem:
The TRS P consists of the following rules:

IF_REV2_3_IN_1_GGA2(X, rev2_3_out_gga1(US)) -> REV_2_IN_GA1(US)
REV2_3_IN_GGA2(X, ._22(Y, YS)) -> REV2_3_IN_GGA2(Y, YS)
IF_REV2_3_IN_1_GGA2(X, rev2_3_out_gga1(US)) -> IF_REV2_3_IN_2_GGA2(X, rev_2_in_ga1(US))
IF_REV_2_IN_1_GA3(X, XS, rev1_3_out_gga1(Y)) -> REV2_3_IN_GGA2(X, XS)
REV2_3_IN_GGA2(X, ._22(Y, YS)) -> IF_REV2_3_IN_1_GGA2(X, rev2_3_in_gga2(Y, YS))
REV_2_IN_GA1(._22(X, XS)) -> IF_REV_2_IN_1_GA3(X, XS, rev1_3_in_gga2(X, XS))
IF_REV2_3_IN_2_GGA2(X, rev_2_out_ga1(VS)) -> REV_2_IN_GA1(._22(X, VS))

The TRS R consists of the following rules:

rev_2_in_ga1([]_0) -> rev_2_out_ga1([]_0)
rev_2_in_ga1(._22(X, XS)) -> if_rev_2_in_1_ga3(X, XS, rev1_3_in_gga2(X, XS))
rev1_3_in_gga2(X, []_0) -> rev1_3_out_gga1(X)
rev1_3_in_gga2(X, ._22(Y, YS)) -> if_rev1_3_in_1_gga1(rev1_3_in_gga2(Y, YS))
if_rev1_3_in_1_gga1(rev1_3_out_gga1(Z)) -> rev1_3_out_gga1(Z)
if_rev_2_in_1_ga3(X, XS, rev1_3_out_gga1(Y)) -> if_rev_2_in_2_ga2(Y, rev2_3_in_gga2(X, XS))
rev2_3_in_gga2(X, []_0) -> rev2_3_out_gga1([]_0)
rev2_3_in_gga2(X, ._22(Y, YS)) -> if_rev2_3_in_1_gga2(X, rev2_3_in_gga2(Y, YS))
if_rev2_3_in_1_gga2(X, rev2_3_out_gga1(US)) -> if_rev2_3_in_2_gga2(X, rev_2_in_ga1(US))
if_rev2_3_in_2_gga2(X, rev_2_out_ga1(VS)) -> if_rev2_3_in_3_gga1(rev_2_in_ga1(._22(X, VS)))
if_rev2_3_in_3_gga1(rev_2_out_ga1(ZS)) -> rev2_3_out_gga1(ZS)
if_rev_2_in_2_ga2(Y, rev2_3_out_gga1(YS)) -> rev_2_out_ga1(._22(Y, YS))

The set Q consists of the following terms:

rev_2_in_ga1(x0)
rev1_3_in_gga2(x0, x1)
if_rev1_3_in_1_gga1(x0)
if_rev_2_in_1_ga3(x0, x1, x2)
rev2_3_in_gga2(x0, x1)
if_rev2_3_in_1_gga2(x0, x1)
if_rev2_3_in_2_gga2(x0, x1)
if_rev2_3_in_3_gga1(x0)
if_rev_2_in_2_ga2(x0, x1)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {REV_2_IN_GA1, IF_REV2_3_IN_1_GGA2, REV2_3_IN_GGA2, IF_REV2_3_IN_2_GGA2, IF_REV_2_IN_1_GA3}.
By using a polynomial ordering, the following set of Dependency Pairs of this DP problem can be strictly oriented.

IF_REV2_3_IN_1_GGA2(X, rev2_3_out_gga1(US)) -> REV_2_IN_GA1(US)
REV2_3_IN_GGA2(X, ._22(Y, YS)) -> REV2_3_IN_GGA2(Y, YS)
REV_2_IN_GA1(._22(X, XS)) -> IF_REV_2_IN_1_GA3(X, XS, rev1_3_in_gga2(X, XS))
The remaining Dependency Pairs were at least non-strictly be oriented.

IF_REV2_3_IN_1_GGA2(X, rev2_3_out_gga1(US)) -> IF_REV2_3_IN_2_GGA2(X, rev_2_in_ga1(US))
IF_REV_2_IN_1_GA3(X, XS, rev1_3_out_gga1(Y)) -> REV2_3_IN_GGA2(X, XS)
REV2_3_IN_GGA2(X, ._22(Y, YS)) -> IF_REV2_3_IN_1_GGA2(X, rev2_3_in_gga2(Y, YS))
IF_REV2_3_IN_2_GGA2(X, rev_2_out_ga1(VS)) -> REV_2_IN_GA1(._22(X, VS))
With the implicit AFS we had to orient the following set of usable rules non-strictly.

rev2_3_in_gga2(X, []_0) -> rev2_3_out_gga1([]_0)
if_rev2_3_in_3_gga1(rev_2_out_ga1(ZS)) -> rev2_3_out_gga1(ZS)
if_rev_2_in_1_ga3(X, XS, rev1_3_out_gga1(Y)) -> if_rev_2_in_2_ga2(Y, rev2_3_in_gga2(X, XS))
if_rev2_3_in_2_gga2(X, rev_2_out_ga1(VS)) -> if_rev2_3_in_3_gga1(rev_2_in_ga1(._22(X, VS)))
rev_2_in_ga1([]_0) -> rev_2_out_ga1([]_0)
if_rev2_3_in_1_gga2(X, rev2_3_out_gga1(US)) -> if_rev2_3_in_2_gga2(X, rev_2_in_ga1(US))
rev_2_in_ga1(._22(X, XS)) -> if_rev_2_in_1_ga3(X, XS, rev1_3_in_gga2(X, XS))
rev2_3_in_gga2(X, ._22(Y, YS)) -> if_rev2_3_in_1_gga2(X, rev2_3_in_gga2(Y, YS))
if_rev_2_in_2_ga2(Y, rev2_3_out_gga1(YS)) -> rev_2_out_ga1(._22(Y, YS))
Used ordering: POLO with Polynomial interpretation:

POL(rev2_3_out_gga1(x1)) = x1   
POL(rev1_3_out_gga1(x1)) = 0   
POL(if_rev2_3_in_2_gga2(x1, x2)) = 1 + x2   
POL(if_rev2_3_in_1_gga2(x1, x2)) = 1 + x2   
POL(REV_2_IN_GA1(x1)) = x1   
POL(if_rev2_3_in_3_gga1(x1)) = x1   
POL(rev2_3_in_gga2(x1, x2)) = x2   
POL(rev1_3_in_gga2(x1, x2)) = 0   
POL([]_0) = 0   
POL(if_rev1_3_in_1_gga1(x1)) = 0   
POL(IF_REV_2_IN_1_GA3(x1, x2, x3)) = x2   
POL(REV2_3_IN_GGA2(x1, x2)) = x2   
POL(rev_2_in_ga1(x1)) = x1   
POL(._22(x1, x2)) = 1 + x2   
POL(if_rev_2_in_1_ga3(x1, x2, x3)) = 1 + x2   
POL(rev_2_out_ga1(x1)) = x1   
POL(if_rev_2_in_2_ga2(x1, x2)) = 1 + x2   
POL(IF_REV2_3_IN_1_GGA2(x1, x2)) = 1 + x2   
POL(IF_REV2_3_IN_2_GGA2(x1, x2)) = 1 + x2   



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
                  ↳ QDP
                    ↳ QDPPoloProof
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF_REV2_3_IN_1_GGA2(X, rev2_3_out_gga1(US)) -> IF_REV2_3_IN_2_GGA2(X, rev_2_in_ga1(US))
IF_REV_2_IN_1_GA3(X, XS, rev1_3_out_gga1(Y)) -> REV2_3_IN_GGA2(X, XS)
REV2_3_IN_GGA2(X, ._22(Y, YS)) -> IF_REV2_3_IN_1_GGA2(X, rev2_3_in_gga2(Y, YS))
IF_REV2_3_IN_2_GGA2(X, rev_2_out_ga1(VS)) -> REV_2_IN_GA1(._22(X, VS))

The TRS R consists of the following rules:

rev_2_in_ga1([]_0) -> rev_2_out_ga1([]_0)
rev_2_in_ga1(._22(X, XS)) -> if_rev_2_in_1_ga3(X, XS, rev1_3_in_gga2(X, XS))
rev1_3_in_gga2(X, []_0) -> rev1_3_out_gga1(X)
rev1_3_in_gga2(X, ._22(Y, YS)) -> if_rev1_3_in_1_gga1(rev1_3_in_gga2(Y, YS))
if_rev1_3_in_1_gga1(rev1_3_out_gga1(Z)) -> rev1_3_out_gga1(Z)
if_rev_2_in_1_ga3(X, XS, rev1_3_out_gga1(Y)) -> if_rev_2_in_2_ga2(Y, rev2_3_in_gga2(X, XS))
rev2_3_in_gga2(X, []_0) -> rev2_3_out_gga1([]_0)
rev2_3_in_gga2(X, ._22(Y, YS)) -> if_rev2_3_in_1_gga2(X, rev2_3_in_gga2(Y, YS))
if_rev2_3_in_1_gga2(X, rev2_3_out_gga1(US)) -> if_rev2_3_in_2_gga2(X, rev_2_in_ga1(US))
if_rev2_3_in_2_gga2(X, rev_2_out_ga1(VS)) -> if_rev2_3_in_3_gga1(rev_2_in_ga1(._22(X, VS)))
if_rev2_3_in_3_gga1(rev_2_out_ga1(ZS)) -> rev2_3_out_gga1(ZS)
if_rev_2_in_2_ga2(Y, rev2_3_out_gga1(YS)) -> rev_2_out_ga1(._22(Y, YS))

The set Q consists of the following terms:

rev_2_in_ga1(x0)
rev1_3_in_gga2(x0, x1)
if_rev1_3_in_1_gga1(x0)
if_rev_2_in_1_ga3(x0, x1, x2)
rev2_3_in_gga2(x0, x1)
if_rev2_3_in_1_gga2(x0, x1)
if_rev2_3_in_2_gga2(x0, x1)
if_rev2_3_in_3_gga1(x0)
if_rev_2_in_2_ga2(x0, x1)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_REV2_3_IN_2_GGA2, IF_REV2_3_IN_1_GGA2, REV2_3_IN_GGA2, IF_REV_2_IN_1_GA3, REV_2_IN_GA1}.
The approximation of the Dependency Graph contains 0 SCCs with 4 less nodes.